package org.ix.gateway.route.model.response;

import com.alibaba.excel.annotation.ExcelProperty;
import org.ix.common.excel.*;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@ApiModel(description = "网关路由列表元素响应实体")
@Getter
@Setter
@ToString
public class GatewayRouteListItemResponse implements Serializable {

    @ExcelProperty(value = "路由id", index = 0)
    @ApiModelProperty(value = "路由id", position = 0)
    private String id;

    @ExcelProperty(value = "转发目标uri", index = 1)
    @ApiModelProperty(value = "转发目标uri", position = 1)
    private String uri;

    @ExcelProperty(value = "断言集合JSON", index = 2)
    @ApiModelProperty(value = "断言集合JSON", position = 2)
    private String predicates;

    @ExcelProperty(value = "过滤器集合JSON", index = 3)
    @ApiModelProperty(value = "过滤器集合JSON", position = 3)
    private String filters;

    @ExcelProperty(value = "Metadata", index = 4)
    @ApiModelProperty(value = "Metadata", position = 4)
    private String metadata;

    @ExcelProperty(value = "路由执行顺序", index = 5)
    @ApiModelProperty(value = "路由执行顺序", position = 5)
    private Integer routeOrder;

    @ExcelProperty(value = "是否删除", index = 6)
    @ApiModelProperty(value = "是否删除", position = 6)
    private Integer deleted;

    @ExcelProperty(value = "创建人", index = 7)
    @ApiModelProperty(value = "创建人", position = 7)
    private Integer createUser;

    @ExcelProperty(value = "修改人", index = 8)
    @ApiModelProperty(value = "修改人", position = 8)
    private Integer updateUser;

    @ExcelProperty(value = "创建时间", index = 9, converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat
    @ApiModelProperty(value = "创建时间", position = 9)
    private LocalDateTime createTime;

    @ExcelProperty(value = "更新时间", index = 10, converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat
    @ApiModelProperty(value = "更新时间", position = 10)
    private LocalDateTime updateTime;
}
